<!doctype html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>北极星后台管理系统</title>
        <link rel="shortcut icon" href="__PUBLIC__/Home/images/favicon.ico"/>
        <load href="__STATIC__/jquery-2.0.3.min.js" />
        <load href="__CSS__/adminstyle.css" />

        <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>

        <script>$(document).ready(function(c) {
        	$('.close').on('click', function(c){
        		$('.login-form').fadeOut('slow', function(c){
        	  		$('.login-form').remove();
        		});
        	});
        });
        </script>
    </head>


    <body id="login-page">
        <h1>北极星后台登录</h1>
        <div class="login-form">
        	<div class="close"> </div>
        		<div class="head-info">
        			<label class="lbl-1"> </label>
        			<label class="lbl-2"> </label>
        			<label class="lbl-3"> </label>
        		</div>
        			<div class="clear"> </div>
        		<div class="avtar">
        			<img src="__IMG__/avtar.jpg" width="100"/>
        		</div>
			<form action="__SELF__" method="post" class="login-form" >
                <input type="text" class="text"  value="Username"  name="username"  autocomplete="off"  placeholder="*User" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = '';}" >

    			<div class="key">
                    <input type="password"  autocomplete="off"  name="password" placeholder="*Pass" value="Password" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = '';}" >
    			</div>

        	<div class="signin">
                <div class="check-tips"></div>
        		<input type="submit" value="Login" >
        	</div>
            </form>
        </div>
        <div class="copy-rights">
       	    <p>Copyright &copy; 2016. 北极星 All rights reserved.More Templates <a href="" target="_blank" title=""></a></p>
        </div>
    </body>

    <!--<![endif]-->
    <script type="text/javascript">

    	//表单提交
    	$(document)
	    	.ajaxStart(function(){
	    		$("input:submit").addClass("log-in").attr("disabled", true);
	    	})
	    	.ajaxStop(function(){
	    		$("input:submit").removeClass("log-in").attr("disabled", false);
	    	});

    	$("form").submit(function(){

    		var self = $(this);
    		$.post(self.attr("action"), self.serialize(), success, "json");
    		return false;

    		function success(data){
    			if(data.status){
    				window.location.href = data.url;
    			} else {
    				self.find(".check-tips").text(data.info);
    			}
    		}
    	});

		$(function(){
			//初始化选中用户名输入框
			$("#itemBox").find("input[name=username]").focus();


            //placeholder兼容性
                //如果支持
            function isPlaceholer(){
                var input = document.createElement('input');
                return "placeholder" in input;
            }
                //如果不支持
            if(!isPlaceholer()){
                $(".placeholder_copy").css({
                    display:'block'
                })
                $("#itemBox input").keydown(function(){
                    $(this).parents(".item").next(".placeholder_copy").css({
                        display:'none'
                    })
                })
                $("#itemBox input").blur(function(){
                    if($(this).val()==""){
                        $(this).parents(".item").next(".placeholder_copy").css({
                            display:'block'
                        })
                    }
                })
            }
		});
    </script>

</html>
